home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / Information / CSMP Digest / volume 1 / csmp-v1-161.txt < prev    next >
Encoding:
Text File  |  1994-12-08  |  45.0 KB  |  1,283 lines  |  [TEXT/R*ch]

  1. C.S.M.P. Digest             Wed, 05 Aug 92       Volume 1 : Issue 161
  2.  
  3. Today's Topics:
  4.  
  5.     SCSI sample routine (Courtesy of Thomas R. Shaw, OTIC, Inc.)
  6.     Does error 25 ("dsMemFullErr") come from QuickDraw?
  7.     MoreMasters and INITs
  8.     Programming secrets 2nd ed.
  9.     Dialog Question...
  10.     Dragging text...
  11.     Apple's Resource compression
  12.  
  13.  
  14.  
  15. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  16.  
  17. The digest is a collection of article threads from the internet newsgroup
  18. comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
  19. regularly and want an archive of the discussions.  If you don't know what a
  20. newsgroup is, you probably don't have access to it.  Ask your systems
  21. administrator(s) for details.  (This means you can't post questions to the
  22. digest.)
  23.  
  24. Each issue of the digest contains one or more sets of articles (called
  25. threads), with each set corresponding to a 'discussion' of a particular
  26. subject.  The articles are not edited; all articles included in this digest
  27. are in their original posted form (as received by our news server at
  28. cs.uoregon.edu).  Article threads are not added to the digest until the last
  29. article added to the thread is at least one month old (this is to ensure that
  30. the thread is dead before adding it to the digest).  Article threads that
  31. consist of only one message are generally not included in the digest.
  32.  
  33. The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu
  34. [128.223.8.8] in the directory /pub/mac/csmp-digest.  Be sure to read the
  35. file /pub/mac/csmp-digest/README before downloading any files.  The most
  36. recent issues are available from sumex-aim.stanford.edu [36.44.0.6] in the
  37. directory /info-mac/digest/csmp.  If you don't have ftp capability, the sumex
  38. archive has a mail server; send a message with the text '$MACarch help' (no
  39. quotes) to LISTSERV@ricevm1.rice.edu for more information.
  40.  
  41. The digest is also available via email.  Just send a note saying that you
  42. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  43. automatically receive each new issue as it is created.  Sorry, back issues
  44. are not available through the mailing list.
  45.  
  46. Send administrative mail to mkelly@cs.uoregon.edu.
  47.  
  48.  
  49. -------------------------------------------------------
  50.  
  51. From: david@oahu.cs.ucla.edu (David Dantowitz)
  52. Subject: SCSI sample routine (Courtesy of Thomas R. Shaw, OTIC, Inc.)
  53. Date: 3 Jul 92 03:14:03 GMT
  54. Organization: UCLA Computer Science Department
  55.  
  56.  
  57. Here's a sample low-level SCSI routine that was posted to AppleLink by
  58. Thomas R. Shaw of OTIC, Inc.  Please honor his copyright notice below.
  59.  
  60. - ---- cut here -----
  61. /* file: scsisample.h 
  62.  
  63. (c)1990-1992 OTIC, Inc., Thomas R. Shaw, POB 510073, Melbourne Beach, FL 32951,
  64. INTERNET: D0430@applelink.apple.com AppleLink: D0430
  65. You may reuse and incorporate this into other packages with the proviso that
  66. credit is given and if used in a commercial package a copy of the package is
  67. provided to the author.
  68.  
  69. */
  70.  
  71. #define scsiReadXfer 1
  72. #define scsiWriteXfer -1
  73. #define scsiNoXfer 0
  74.  
  75. OSErr 
  76. DoSCSIOutput(
  77.     short TargetSCSIID, 
  78.     short scsiCmdSize,
  79.     void * scsiCmd,
  80.     SCSIInstr *scsiInst, 
  81.     short RdWrNone, 
  82.     long TimeOut);
  83.  
  84.  
  85.  
  86. - ---- cut here -----
  87. /* file: scsisample.c
  88.  
  89. (c)1990-1992 OTIC, Inc., Thomas R. Shaw, POB 510073, Melbourne Beach, FL 32951,
  90. INTERNET: D0430@applelink.apple.com AppleLink: D0430
  91. You may reuse and incorporate this into other packages with the proviso that
  92. credit is given and if used in a commercial package a copy of the package is
  93. provided to the author.
  94.  
  95. */
  96.  
  97.  
  98. //Here's a routine that we use. HoldBufferMemory is used to lock memory for VM.
  99.  
  100. #include <stdio.h>
  101. #include <scsi.h>
  102. #include <stdlib.h>
  103.  
  104. #include "scsi sample.h"
  105.  
  106. #define HoldBufferMemory(a, b) HoldMemory(a, b)
  107. #define ReleaseBufferMemory(a, b) UnholdMemory(a, b)
  108.  
  109.  
  110. #define kSCSIStatusMask 0x1f
  111.  
  112. #define kGood 0x00
  113. #define kCheckCondition 0x02
  114. #define kBusy 0x08
  115. #define kReservationConflict 0x18
  116.  
  117. #define kSCSIRetryValue 5
  118.  
  119. #define bLogicalUnitLSB 5
  120.  
  121. #define kCommandComplete 0x00
  122. #define kExtendedMessage 0x01
  123. #define kSaveDataPointer 0x02
  124. #define kRestorePointers 0x03
  125. #define kDisconnect 0x04
  126. #define kMessageReject 0x07
  127. #define kLinkedCommandComplete 0x0a
  128. #define kLinkedCommandCompleteWithFlags 0x0b
  129.  
  130.  
  131. enum
  132. {
  133. eSCSIReservationConflict=0xf000,
  134. eSCSIBusy,
  135. eDisconnect,
  136. eMessageReject,
  137. eReplyTOErr
  138. };
  139.  
  140.  
  141. #define DoSCSISenseUnit(TargetSCSIID, LogicalUnit) FindError(TargetSCSIID)
  142.  
  143. //#pragma segment SCSISupport
  144. //CorPascal OSErr 
  145.  
  146. OSErr
  147. DoSCSIOutput(
  148.   short TargetSCSIID, 
  149.   short scsiCmdSize,
  150.   void * scsiCmd,
  151.   SCSIInstr *scsiInst, 
  152.   short RdWrNone, 
  153.   long TimeOut)
  154. {
  155. short  ReturnedSCSIStat;
  156. short  ReturnedSCSIMessage;
  157. short  NumTries = 0;
  158. short  stat;
  159. OSErr  err;
  160. OSErr  err1;
  161. short  i;
  162. short  message;
  163.  
  164.   HoldBufferMemory(scsiCmd, scsiCmdSize);
  165.   HoldBufferMemory(scsiInst, 100);
  166.  
  167.   while (NumTries++ < kSCSIRetryValue) 
  168.     {
  169.        err = SCSIGet();
  170.        
  171.        if (err == noErr) 
  172.          {
  173.          err = SCSISelect(TargetSCSIID);
  174.          if (err == noErr) 
  175.            {
  176.            err = SCSICmd((Ptr)(scsiCmd), scsiCmdSize);
  177.            if (err == noErr) 
  178.              {
  179.              stat = SCSIStat();
  180.              
  181.              switch (RdWrNone) 
  182.                {
  183.                case scsiReadXfer:
  184.                  err = SCSIRead((Ptr)scsiInst);
  185.                  break;
  186.                
  187.                case scsiWriteXfer:
  188.                  err = SCSIWrite((Ptr)scsiInst);
  189.                  break;
  190.                
  191.                default:
  192.                  break;
  193.                }
  194.              }
  195.    
  196.            err1 = SCSIComplete(&ReturnedSCSIStat, &ReturnedSCSIMessage, TimeOut);
  197.    
  198.            if (err == noErr) 
  199.              {
  200.              if (err1 == noErr) 
  201.                {
  202.                switch (ReturnedSCSIStat & kSCSIStatusMask) 
  203.                  {
  204.                  case kGood:
  205.                    err = noErr;
  206.                    break;
  207.    
  208. //                 case kConditionMetGood:
  209. //                   err = noErr;
  210. //                   break;
  211.    
  212. //                 case kIntermediateGood:
  213. //                   err = noErr;
  214. //                   break;
  215.    
  216. //                 case kIntermediateMetGood:
  217. //                   err = noErr;
  218. //                   break;
  219.    
  220.                  case kReservationConflict:
  221.                    err = eSCSIReservationConflict;
  222.                    break;
  223.    
  224.                  case kBusy:
  225.                    err = eSCSIBusy;
  226.                    break;
  227.    
  228.                  case kCheckCondition:
  229.                    switch (ReturnedSCSIMessage) 
  230.                      {
  231.  
  232.                      case kCommandComplete:
  233.                      case kLinkedCommandCompleteWithFlags:
  234.                      case kLinkedCommandComplete:
  235.                        err = DoSCSISenseUnit(TargetSCSIID,
  236.                          scsiCmd->LUN_Res >> bLogicalUnitLSB);
  237.                        break;
  238.    
  239.                      case kExtendedMessage:
  240.                        if (SCSIMsgIn(&message) == noErr) 
  241.                          {
  242.                          for (i = 0; i < message; i++) 
  243.                            {
  244.                            if (SCSIMsgIn(&message) != noErr) 
  245.                              break;
  246.                            }
  247.                          }
  248.                        break;
  249.    
  250.                      case kSaveDataPointer:
  251.                        break;
  252.    
  253.                      case kRestorePointers:
  254.                        break;
  255.    
  256.                      case kDisconnect:
  257.                        err = eDisconnect;
  258.    
  259.                      case kMessageReject:
  260.                        err = eMessageReject;
  261.    
  262.                      default:
  263.                        if (ReturnedSCSIMessage >= 0x80) 
  264.                          {
  265.                            err = noErr;
  266.                          } 
  267.                        else 
  268.                          err = DoSCSISenseUnit(TargetSCSIID,
  269.                            scsiCmd->LUN_Res >> bLogicalUnitLSB);
  270.                        break;
  271.                      }
  272.                    break;
  273.                  }
  274.                } 
  275.              else 
  276.                err = err1;
  277.              }
  278.            break;
  279.            }
  280.          }
  281.        }
  282.    
  283.      if (NumTries >= kSCSIRetryValue) 
  284.        err = eReplyTOErr;
  285.  
  286.      ReleaseBufferMemory(scsiCmd, scsiCmdSize);
  287.      ReleaseBufferMemory(scsiInst, 100);
  288.  
  289.      return (err);
  290. }
  291.  
  292. //For simple Xfers you don't need the scsi-2 extra processing.
  293.  
  294. //- Tom
  295.  
  296. //Author: D0430
  297. - -- 
  298. David Dantowitz
  299. david@cs.ucla.edu
  300.  
  301. Singing Barbershop when I'm not doing parallel simulation
  302.  
  303. ---------------------------
  304.  
  305. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  306. Subject: Does error 25 ("dsMemFullErr") come from QuickDraw?
  307. Organization: Kalamazoo College
  308. Date: Tue, 23 Jun 1992 19:05:01 GMT
  309.  
  310. I think I remember reading somewhere that QuickDraw will return 25, not
  311. - -108 ("memFullErr"), if it runs out of memory.  I'm getting a lot of
  312. these in GetFontInfo calls, and I was wondering if anyone could verify
  313. that for me.  If it's not QuickDraw, what might it be?  Any other
  314. little tidbits will be appreciated too.
  315. - -- 
  316.  Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
  317.  Never piss off a computer.
  318.  
  319. +++++++++++++++++++++++++++
  320.  
  321. From: nerm@apple.com (Dean Yu)
  322. Date: 2 Jul 92 18:03:55 GMT
  323. Organization: Apple Computer, Inc.
  324.  
  325. In article <1992Jun23.190501.3713@hobbes.kzoo.edu>, k044477@hobbes.kzoo.edu
  326. (Jamie R. McCarthy) wrote:
  327. > I think I remember reading somewhere that QuickDraw will return 25, not
  328. > -108 ("memFullErr"), if it runs out of memory.  I'm getting a lot of
  329. > these in GetFontInfo calls, and I was wondering if anyone could verify
  330. > that for me.  If it's not QuickDraw, what might it be?  Any other
  331. > little tidbits will be appreciated too.
  332. > -- 
  333. >  Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
  334. >  Never piss off a computer.
  335.  
  336.   The older QuickDraw routines will generate a system error 25 if it can't
  337. get enough memory to complete an operation.  This is the infamous "Jackson"
  338. symbol you'll see in MacsBug.  Newer QuickDraw routines are better behaved
  339. an will return errors.
  340.  
  341. - -- Dean Yu
  342.    Blue Meanie, Negative Ethnic Role Model, etc.
  343.    Apple Computer, Inc.
  344.  
  345. ---------------------------
  346.  
  347. From: jeremyr@dcs.qmw.ac.uk (Jeremy Roussak)
  348. Subject: MoreMasters and INITs
  349. Date: 28 Jun 92 09:18:05 GMT
  350. Organization: Computer Science Dept, QMW, University of London
  351.  
  352. A simple question: if an INIT (sorry, system extension)
  353. allocates a moderately large number of handles in the system
  354. heap at startup time, and retains them for the duration of the
  355. session, should it call MoreMasters for the system heap?
  356.  
  357. Jeremy
  358.  
  359. +++++++++++++++++++++++++++
  360.  
  361. From: keith@taligent.com (Keith Rollin)
  362. Date: 29 Jun 92 17:36:59 GMT
  363. Organization: Taligent
  364.  
  365. In article <1992Jun28.091805.28115@dcs.qmw.ac.uk>, jeremyr@dcs.qmw.ac.uk (Jeremy
  366. Roussak) writes:
  367. > A simple question: if an INIT (sorry, system extension)
  368. > allocates a moderately large number of handles in the system
  369. > heap at startup time, and retains them for the duration of the
  370. > session, should it call MoreMasters for the system heap?
  371.  
  372. It doesn't matter much. The best time to call MoreMasters is just after the heap
  373. has been created. An application can call MoreMasters pretty close to this time,
  374. but not so with INITs. By the time INITs get called, the heap already has a ton
  375. of blocks allocated. The bottom line is that it won't hurt much if you don't,
  376. but you don't gain much benefit if you do. I guess that if I were in your
  377. position, I'd go ahead and call MoreMasters.
  378.  
  379. - --
  380. Keith Rollin
  381. Phantom Programmer
  382. Taligent, Inc.
  383.  
  384. +++++++++++++++++++++++++++
  385.  
  386. From: lsr@taligent.com (Larry Rosenstein)
  387. Date: 30 Jun 92 00:51:36 GMT
  388. Organization: Taligent, Inc.
  389.  
  390. In article <69382@apple.Apple.COM>, keith@taligent.com (Keith Rollin)
  391. wrote:
  392. > of blocks allocated. The bottom line is that it won't hurt much if you don't,
  393. > but you don't gain much benefit if you do. I guess that if I were in your
  394. > position, I'd go ahead and call MoreMasters.
  395.  
  396. I agree with your analysis, but not with the conclusion.  Since you
  397. probably won't gain anything by calling MoreMasters on the System Heap, I
  398. would say that the less you mess around with the System Heap the better.
  399.  
  400. Larry Rosenstein
  401. Taligent, Inc.
  402.  
  403. lsr@taligent.com
  404.  
  405. +++++++++++++++++++++++++++
  406.  
  407. From: keith@taligent.com (Keith Rollin)
  408. Date: 30 Jun 92 18:15:34 GMT
  409. Organization: Taligent
  410.  
  411. In article <lsr-290692174831@lsr.taligent.com>, lsr@taligent.com (Larry
  412. Rosenstein) writes:
  413. > In article <69382@apple.Apple.COM>, keith@taligent.com (Keith Rollin)
  414. > wrote:
  415. > > 
  416. > > of blocks allocated. The bottom line is that it won't hurt much if you
  417. don't,
  418. > > but you don't gain much benefit if you do. I guess that if I were in your
  419. > > position, I'd go ahead and call MoreMasters.
  420. > I agree with your analysis, but not with the conclusion.  Since you
  421. > probably won't gain anything by calling MoreMasters on the System Heap, I
  422. > would say that the less you mess around with the System Heap the better.
  423.  
  424. Uh, oh. The guy who wrote MMInit going head to head with the guy who wrote
  425. MacApp's memory management routines. Will the world survive?
  426.  
  427. I still stick by my guns, Larry. The master pointer blocks are going to be
  428. allocated anyway, regardless of whether the original poster calls MoreMasters or
  429. not. My feeling is that it's better for him to call MoreMasters so that the
  430. master pointer blocks are at least together in memory.
  431.  
  432. "Better" here is a very relative word. The difference is so small as to make
  433. almost no difference at all. The system heap is already a cluttered mess of
  434. relocatable and non-relocatable (and sometimes orphaned -- thank you, N&C)
  435. blocks that it's hard to make it any worse.
  436.  
  437. - --
  438. Keith Rollin
  439. Phantom Programmer
  440. Taligent, Inc.
  441.  
  442.  
  443. +++++++++++++++++++++++++++
  444.  
  445. From: nerm@apple.com (Dean Yu)
  446. Date: 2 Jul 92 18:01:18 GMT
  447. Organization: Apple Computer, Inc.
  448.  
  449. In article <1992Jun28.091805.28115@dcs.qmw.ac.uk>, jeremyr@dcs.qmw.ac.uk
  450. (Jeremy Roussak) wrote:
  451. > A simple question: if an INIT (sorry, system extension)
  452. > allocates a moderately large number of handles in the system
  453. > heap at startup time, and retains them for the duration of the
  454. > session, should it call MoreMasters for the system heap?
  455. > Jeremy
  456.  
  457.   Just as a bit of info, NewHandle will create another master pointer block
  458. if there is no space for another master pointer in existing blocks.  The
  459. reason
  460. you would want to call MoreMasters is because master pointer blocks are
  461. non-
  462. relocatable blocks in the heap, so allocating these blocks early in your
  463. program
  464. helps to reduce heap fragmentation.
  465.   Having said that, if you're really going to use that many handles, then
  466. yes,
  467. you should call MoreMasters for the system heap, keeping in mind that each
  468. call
  469. to MoreMasters gives you space for 64 master pointers.
  470.  
  471. - -- Dean Yu
  472.    Blue Meanie, Negative Ethnic Role Model, etc.
  473.    Apple Computer, Inc.
  474.  
  475. ---------------------------
  476.  
  477. From: marshall@kauri.vuw.ac.nz (Stephen Marshall)
  478. Subject: Programming secrets 2nd ed.
  479. Organization: Victoria University of Wellington
  480. Date: Mon, 29 Jun 1992 01:12:16 GMT
  481.  
  482. Hi, I understand that the second edition of Macintosh Programming Secrets
  483. is out, does anyone have the details - Author, ISBN etc. and a potted
  484. summary?
  485.  
  486. Thanks for any help
  487. Stephen
  488.  
  489.  
  490. +++++++++++++++++++++++++++
  491.  
  492. From: keith@taligent.com (Keith Rollin)
  493. Date: 29 Jun 92 17:41:31 GMT
  494. Organization: Taligent
  495.  
  496. In article <1992Jun29.011216.24991@rata.vuw.ac.nz>, marshall@kauri.vuw.ac.nz
  497. (Stephen Marshall) writes:
  498. > Hi, I understand that the second edition of Macintosh Programming Secrets
  499. > is out, does anyone have the details - Author, ISBN etc. and a potted
  500. > summary?
  501.  
  502. I'm the co-author (along with Scott Knaster). The ISBN is 0-201-58134-5.
  503.  
  504. I'm a bit biased, so I'll let others tell you if they think it's any good. From
  505. the private mail I've received, however, it seems that most people like it
  506. (whew!).
  507.  
  508. - --
  509. Keith Rollin
  510. Phantom Programmer
  511. Taligent, Inc.
  512.  
  513.  
  514. +++++++++++++++++++++++++++
  515.  
  516. From: Thad.Humphries@p950.f70.n109.z1.fidonet.org (Thad Humphries)
  517. Date: 30 Jun 92 03:17:51 GMT
  518.  
  519.  
  520.   KR> From: keith@taligent.com (Keith Rollin) Newsgroups:
  521. ...
  522.   KR> I'm the co-author (along with Scott Knaster). The ISBN is
  523.   KR> 0-201-58134-5.
  524.   KR> 
  525.   KR> I'm a bit biased, so I'll let others tell you if they think it's any
  526.   KR> good. From the private mail I've received, however, it seems that most
  527.   KR> people like it (whew!).
  528.  
  529. It is an *excellent* book, proof reading errors and all.  In fact, you should
  530. have my $20 for the disk by now.
  531.  
  532. +++++++++++++++++++++++++++
  533.  
  534. From: jxs18@po.CWRU.Edu (Jerry Sy)
  535. Date: 30 Jun 92 22:16:24 GMT
  536. Organization: Case Western Reserve University, Cleveland, OH (USA)
  537.  
  538.  
  539. In a previous article, Thad.Humphries@p950.f70.n109.z1.fidonet.org (Thad Humphries) says:
  540.  
  541. >  KR> From: keith@taligent.com (Keith Rollin) Newsgroups:
  542. >...
  543. >  KR> I'm the co-author (along with Scott Knaster). The ISBN is
  544. >  KR> 0-201-58134-5.
  545. >  KR> 
  546. >  KR> I'm a bit biased, so I'll let others tell you if they think it's any
  547. >  KR> good. From the private mail I've received, however, it seems that most
  548. >  KR> people like it (whew!).
  549. >
  550. could keith rollin or scott knaster explain what the meaning of the cover
  551. of their new book ? like who are the people in the picture, up stairs
  552. company, I love IBM, Inside Mac vol XXXVIII, etc.
  553.  
  554. jerry
  555.  
  556. +++++++++++++++++++++++++++
  557.  
  558. From: Jerry.Lobdill@p868.f70.n109.z1.fidonet.org (Jerry Lobdill)
  559. Date: Tue, 30 Jun 1992 07:00:29 -0500
  560.  
  561. 'Twas a dark and stormy night (6/29/92) when Keith Rollin rose and said to
  562. All... 
  563.  
  564.   KR> From: keith@taligent.com (Keith Rollin) Newsgroups:
  565.   KR> comp.sys.mac.programmer Organization: Taligent
  566.   KR> 
  567.   KR> In article <1992Jun29.011216.24991@rata.vuw.ac.nz>,
  568.   KR> marshall@kauri.vuw.ac.nz (Stephen Marshall) writes:
  569.   KR> 
  570.   > Hi, I understand that the second edition of Macintosh Programming
  571.   > Secrets is out, does anyone have the details - Author, ISBN etc. and a
  572.   > potted summary?
  573.   KR> I'm the co-author (along with Scott Knaster). The ISBN is
  574.   KR> 0-201-58134-5.
  575.   KR> 
  576.   KR> I'm a bit biased, so I'll let others tell you if they think it's any
  577.   KR> good. From the private mail I've received, however, it seems that most
  578.   KR> people like it (whew!). -- Keith Rollin Phantom Programmer Taligent,
  579.   KR> Inc.
  580.  ******************
  581. I have the 1st edition and think it is excellent. Can you say anything about
  582. what's new in the 2nd edition?
  583.  
  584. Thanks,
  585. *********************
  586.  
  587. +++++++++++++++++++++++++++
  588.  
  589. From: keith@taligent.com (Keith Rollin)
  590. Date: 1 Jul 92 18:01:03 GMT
  591. Organization: Taligent
  592.  
  593. In article <1992Jun30.221624.7370@usenet.ins.cwru.edu>, jxs18@po.CWRU.Edu (Jerry
  594. Sy) writes:
  595. > In a previous article, Thad.Humphries@p950.f70.n109.z1.fidonet.org (Thad
  596. Humphries) says:
  597. > >  KR> From: keith@taligent.com (Keith Rollin) Newsgroups:
  598. > >...
  599. > >  KR> I'm the co-author (along with Scott Knaster). The ISBN is
  600. > >  KR> 0-201-58134-5.
  601. > >  KR> 
  602. > >  KR> I'm a bit biased, so I'll let others tell you if they think it's any
  603. > >  KR> good. From the private mail I've received, however, it seems that most
  604. > >  KR> people like it (whew!).
  605. > >
  606. > could keith rollin or scott knaster explain what the meaning of the cover
  607. > of their new book ? like who are the people in the picture, up stairs
  608. > company, I love IBM, Inside Mac vol XXXVIII, etc.
  609.  
  610. Hey, bud. See the coupon in the back of the book? You're supposed to pony $20
  611. for privileged information like that!   :-)
  612.  
  613. OK, here's the deal (by the way, the cover of the book was the topic of a trivia
  614. scavenger hunt at this year's WorldWide Developer's Conference).
  615.  
  616. On the spine is an inverted picture of the dogcow. That's the Anti-dogcow, which
  617. seemed the appropriate logo for two ex-DTS workers (the dogcow is the mascot of
  618. Mac DTS).
  619.  
  620. Scott is the one sitting down with the Jolt Cola. I'm the one standing next to
  621. him with the Pink Floyd album ("Pink." Get it?). The guy in the red sweater is
  622. Andy Hertzfeld, and the guy shooting the spitball at me is Bill Atkinson. Not
  623. only do these two people have a lot to do with the genesis of the Mac, but they
  624. also work with Scott at General Magic. The kid on the skateboard is Jess
  625. Knaster, Scott's son, and the babe whose picture is on the desk is Laura Palmer
  626. from Twin Peaks (an old girlfriend of mine said "Yeah, and I can see her twin
  627. peaks, too"). Finally, the guy on the wall with the darts in him is Bjarne
  628. Stroustrap, the progenitor of C++.
  629.  
  630. On the wall on the left is a poster of Flood, the second most recent They Might
  631. Be Giants album. You might guess that that poster is there because both Scott
  632. and I are Giants fans (see the cap on Scott's head, the bat in the lower-right
  633. corner, and the Giants-A's World Series brochure at the bottom), but it's also
  634. the album that Scott listened to while writing the prose of the book.
  635.  
  636. Van Dyke apartments is where Scott's mother lives.
  637.  
  638. Between Andy and the Flood poster is the AppleShare icon, positioned to look
  639. like it's Andy's real hand and arm. On top of the computer Andy is hold is
  640. coffee and donuts, also from Twin Peaks. On the screen of the monitor Andy is
  641. holding is the original Enterprise, not that luxury yacht they show on TNG.
  642.  
  643. On the bookshelf next to Andy are: Macintosh ROM Source Listing binder, How To
  644. Write Macintosh Software, Inside Mac Volume XXXVIII, Cooking With HyperTalk (a
  645. book by Scott and Dan Winkler), Oddyssey (by John Sculley), and the Baseball
  646. Encyclopedia.
  647.  
  648. On the floor in front of the bookshelf is a box with Pinball Trader (a pinball
  649. newsletter put out by a friend of ours), the Star Trek Concordance, a Mad
  650. Magazine (Scott has collected _every_ issue), and the World Series brochure.
  651.  
  652. In front of the box (in the dust created by Jess's skateboard) are some
  653. Macintosh UI elements. There's a menu, a couple of alert icons, a window, and a
  654. pattern palette.
  655.  
  656. Jess is on a skateboard for no really good reason. On the skateboard with him is
  657. the surfer dude from the cover of Inside Mac VI (he's the icon for the
  658. SurfWriter application alluded to in examples inside IM VI). They've just hit
  659. Clarus the dogcow, which is why he'd flying up in the air. (I actually have a
  660. different theory on why Clarus is in the middle of the air. When I worked in
  661. DTS, the term we used for developers who had just done something really stupid
  662. is "grazing off the cliff." I'm of the feeling that Clarus just grazed off the
  663. edge of the desk.)
  664.  
  665. On the side of the desk above Jess is a "I Heart IBM (from now on)" bumper
  666. sticker, alluding to the Apple/IBM alliance. The "Upstairs Company" logo next to
  667. it is Barbara Knaster's consulting company (Barbara is Scott's wife).
  668.  
  669. On the right hand side, next to the desk is the Macintosh garbage can. Next to
  670. that is a sleeping Giants bat.
  671.  
  672. Bill Atkinson is sitting at a desk with a computer with the General Magic Logo
  673. on the screen. Above that screen, on the wall, is a picture of the critter in
  674. the Alien movies. Above Bill's head on the back wall is the cover from Selling
  675. The Dream (Guy Kawasaki's second book) and a flyer for Tony and Alba's pizza
  676. (GREAT pizza!). Just in front of Bill is the Apple logo.
  677.  
  678. Behind me is a pink door ("Pink." Get it?) with a Tall Gent on it and the
  679. Taligent logo beneath it.
  680.  
  681. Finally, on Scott's chest is a Happy Face button with a red arrow in blood
  682. pointing to the 11:30 position. This is from The Watchmen, a "comic" book of
  683. dire foreboding. Going back even further, the Happy Face with arrow on it is the
  684. symbol of a group of physicists (I think that's right) who post their opinion on
  685. how close the world is to nuclear armageddon. The closer the arrow gets to
  686. midnight, the closer they think we are to blowing ourselves off the face of the
  687. planet.
  688.  
  689. Well, I think that's about it. If I've missed anything, just point it out.
  690.  
  691. By the way, the cover was created and drawn by Angelo Torres of Mad Magazine. He
  692. also did the cover of How To Write Macintosh Software, 3rd edition.
  693.  
  694. - --
  695. Keith Rollin
  696. Phantom Programmer
  697. Taligent, Inc.
  698.  
  699.  
  700. +++++++++++++++++++++++++++
  701.  
  702. From: keith@taligent.com (Keith Rollin)
  703. Date: 1 Jul 92 19:39:07 GMT
  704. Organization: Taligent
  705.  
  706. In article <709995613.F00001@blkcat.UUCP>,
  707. Jerry.Lobdill@p868.f70.n109.z1.fidonet.org (Jerry Lobdill) writes:
  708. > 'Twas a dark and stormy night (6/29/92) when Keith Rollin rose and said to
  709. > All... 
  710. >   KR> From: keith@taligent.com (Keith Rollin) Newsgroups:
  711. >   KR> comp.sys.mac.programmer Organization: Taligent
  712. >   KR> 
  713. >   KR> In article <1992Jun29.011216.24991@rata.vuw.ac.nz>,
  714. >   KR> marshall@kauri.vuw.ac.nz (Stephen Marshall) writes:
  715. >   KR> 
  716. >   > Hi, I understand that the second edition of Macintosh Programming
  717. >   > Secrets is out, does anyone have the details - Author, ISBN etc. and a
  718. >   > potted summary?
  719. >   KR> I'm the co-author (along with Scott Knaster). The ISBN is
  720. >   KR> 0-201-58134-5.
  721. >   KR> 
  722. >   KR> I'm a bit biased, so I'll let others tell you if they think it's any
  723. >   KR> good. From the private mail I've received, however, it seems that most
  724. >   KR> people like it (whew!). -- Keith Rollin Phantom Programmer Taligent,
  725. >   KR> Inc.
  726. >  ******************
  727. >
  728. > I have the 1st edition and think it is excellent. Can you say anything about
  729. > what's new in the 2nd edition?
  730. > *********************
  731.  
  732. The second edition is almost entirely new.
  733.  
  734. As you may recall, the first edition was split into two parts. The first part
  735. was a historical background and philosophy section. The second part was a
  736. technical section (but, alas, lacking in source code samples). The two sections
  737. were divided by a cartoon showing how the event manager worked.
  738.  
  739. In the new edition, the book is still split up into two parts. The first section
  740. is mostly the same, updated to take out anachronisms (like references to the
  741. possibilities of multi-tasking and 32-bit cleanliness) and add current
  742. information (like System 7.0 stuff).
  743.  
  744. The cartoon has been replaced by famous Apple About boxes. The first is the
  745. unexpurgated MultiFinder 1.0 about box (the official release version had all the
  746. good parts bleeped; we've put them back in for the book). The second is the text
  747. from the circus parade from one of the preliminary 7.0 release CD's.
  748.  
  749. The second section is where all the new information are.
  750.  
  751. Chapter 3 shows the application skeleton used for all the samples in the book.
  752. Rather than duplicate the same code that handles initialization, windows, and
  753. menus in each chapter, we show it just once. All the subsequent chapters tweak
  754. the skeleton a little and then get on with the interesting stuff.
  755.  
  756. Chapter 4 is on dialogs. It shows how to handle modal, modeless, and
  757. movable-modal dialogs. The sample for the modal dialog is based on an idea in
  758. the first book, where command-key equivalents are assigned to all the dialogs
  759. items. The modeless dialog shows a sample "Find" dialog that uses the 7.0
  760. popupmenu control. The movable-modal dialog shows how to do a progress indicator
  761. like the Finder's.
  762.  
  763. Chapter 5 talks about QuickDraw. It starts off a lot like the QuickDraw chapter
  764. of the first edition, but then delves a little more into current color issues.
  765. The second half of the chapter implements an idea put forth in the first
  766. edition, where offscreen buffers are used to save the contents of background
  767. windows when a dialog is displayed, and then used to restore the contents of
  768. those windows when the dialog is dismissed.
  769.  
  770. Chapter 6 deals more with QuickDraw and shows how to do mouse tracking. The
  771. sample program reads in a MacPaint picture. The user can then use the mouse to
  772. etch out a rectangular selection that does the "marching ants" animation. The
  773. selection can then be clicked on and dragged around. Offscreen buffers are used
  774. for this, too.
  775.  
  776. Chapter 7 gets into window management. We show how to implement Tile Windows and
  777. Stack Windows menu items, and show how to do a Window menu that keeps track of
  778. all the open windows. The algorithms for tiling and stacking work across
  779. multiple monitors.
  780.  
  781. Chapter 8 delves into the File Manager. A simple program is shown that allows
  782. the user to select a file (using Standard File), and target directory (again,
  783. using Standard File) and then copies the file to the destination in small
  784. chunks. The reader is encouraged to integrate the copy routine with the progress
  785. indicator shown in Chapter 4.
  786.  
  787. Chapter 9 develops different kinds of standalone code. The first sample is a
  788. simple INIT that beeps at startup. Then a more realistic INIT is given that
  789. causes a command-key sequence to zoom the frontmost window (I actually use this
  790. INIT in my everyday work). Next, we show how to implement an LDEF that draws
  791. icons and grays out disabled items. Finally, we give the source code to a
  792. windoid WDEF (the kind of window usually associated with floating windows). Note
  793. that we don't actually show how to do floating windows (bummer).
  794.  
  795. Chapter 10 is a collection of little routines that aren't large enough to
  796. qualify for chapters of their own. We show how THINK programmers can do spinning
  797. cursors based on MPW's 'acur' resources. We even show how such animation can be
  798. done an interrupt time (even though I personally don't approve of the practice).
  799. We show how applications can check for Command-Period without calling
  800. WaitNextEvent, and how to implement a password-entry dialog box with the little
  801. bullet characters. We also show how to hide the menubar.
  802.  
  803. In summary, chapters 1 and 2 are a lot like the first edition. Chapters 4, 5,
  804. and 7 are partially based on information and ideas in the first edition. The
  805. remaining chapters (3, 6, 8, 9, and 10) are totally new. If you get the second
  806. edition, keep the first edition handy, because there's a lot of material we
  807. threw away (like a lot of stuff dealing with printing and the Finder desktop
  808. database).
  809.  
  810. All of the chapters include complete source code (in THINK C) to all of the
  811. interesting stuff we talk about. Two people have complained about our not
  812. including and resource dumps, but all of the resources we use are
  813. straightforward enough that we didn't want to fill up pages and pages with
  814. blocks of data (Like icons. I used to hate that about the old MacTutor -- I hope
  815. the new MacTutor is better). Besides, we used ResEdit exclusively, and there
  816. were no .r files.
  817.  
  818. - --
  819. Keith Rollin
  820. Phantom Programmer
  821. Taligent, Inc.
  822.  
  823.  
  824. +++++++++++++++++++++++++++
  825.  
  826. From: marshall@kauri.vuw.ac.nz (Stephen Marshall)
  827. Organization: Victoria University of Wellington, New Zealand
  828. Date: Thu, 2 Jul 1992 22:56:01 GMT
  829.  
  830. Well, thanks to Keith and the others who replyed, I have decided to go 
  831. ahead and buy it, although I must say I would have been much happier if
  832. the code was Pascal rather than C, as I'll probably have to go out and 
  833. buy Think C 5 as well 8-) 
  834.  
  835. Thanks to all who replied
  836. Stephen
  837.  
  838. +++++++++++++++++++++++++++
  839.  
  840. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  841. Date: 3 Jul 92 11:58:30 GMT
  842. Organization: Kalamazoo College
  843.  
  844. keith@taligent.com (Keith Rollin) writes:
  845. > [ On the cover of his new book... ]
  846. >On the wall on the left is a poster of Flood, the second most recent They Might
  847. >Be Giants album. You might guess that that poster is there because both Scott
  848. >and I are Giants fans (see the cap on Scott's head, the bat in the lower-right
  849. >corner, and the Giants-A's World Series brochure at the bottom), but it's also
  850. >the album that Scott listened to while writing the prose of the book.
  851.  
  852. This is quite appropriate, since TBMG used a Mac Plus as a sequencer on
  853. their first album.  If you've heard that album, you know that the Mac
  854. was playing 90% of their music for them...   :-)
  855.  
  856. They may still be using Macs, I don't know; I gleaned that info-tidbit
  857. from one of those trendy college magazines a few years back.
  858. - -- 
  859.  Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
  860.  "Whenever I open the manuals for OOP, I have the strangest desire to find
  861.   the nearest pillow and fall asleep."   - David Denboer
  862.  
  863. ---------------------------
  864.  
  865. From: jedwards@gmuvax2.gmu.edu (James Edwards)
  866. Subject: Dialog Question...
  867. Organization: George Mason University, Fairfax, Va.
  868. Date: Thu, 2 Jul 1992 17:55:46 GMT
  869.  
  870. I have been pulling my hair out over this, but I'm sure that I'm just
  871. not seeing how to make this code work.  I have a dialog box, model, that
  872. has a number of picture items on it, and accompanying check boxes.  What
  873. I want to do, is have the picture change to a different pict resource
  874. when I click on the check boxes.  I know how to get and set the check
  875. box data, but how do I tell the picture item to switch from , for
  876. example, PICT resource 800 to 801?  I know that the picture item is
  877. stored as two bytes in the item list, but I can't figure out how to
  878. manipulae that value.  I know that for some items, you can cast them as
  879. a ControlHandle, and then use the COntrol Manager to make the changes,
  880. but I don't know how to do a picture.  Any helkp anyone has would be
  881. appreciated.  
  882.  
  883. I had thought about makeing the pictures user items, but that seemed
  884. overly tacky if I could do it some simple way.  Thanks,
  885.  
  886. Jimi
  887.  
  888.  
  889. +++++++++++++++++++++++++++
  890.  
  891. From: dobrohoczkim@cc4.crl.aecl.ca
  892. Date: 2 Jul 92 20:16:11 GMT
  893. Organization: AECL RESEARCH
  894.  
  895. I had to do much that same thing heres how I did it in C
  896.  
  897.     pict = GetPicture(128);
  898.     GetDItem(theDialog,theItem,&itemType,&item,&box);
  899.     SetDItem(theDialog,theItem,itemType,(Handle) pict,&box);
  900.     InvalRect(&box);
  901.  
  902. Note I assume that the two pictures are the same size (If they aren't you'll
  903. must adjust the item display rectangle 'box').
  904.  
  905. dobrohoczkim@crl.aecl.ca
  906. Mike Dobrohoczki
  907. Chalk River Laboratories
  908. Atomic Energy Canada Ltd.
  909.  
  910. ---------------------------
  911.  
  912. From: wayner@cs.cornell.edu (Peter Wayner)
  913. Subject: Dragging text...
  914. Organization: Cornell Univ. CS Dept, Ithaca NY 14853
  915. Date: Fri, 3 Jul 1992 17:44:32 GMT
  916.  
  917.  
  918. I need to be able to drag some text around the screen,
  919. but whenever I try to set SetPen(patXor), it doesn't 
  920. seem to work. Is the DrawChar routine resetting the
  921. pen? Or am I missing something really trivial or stupid? 
  922.  
  923. - -Peter
  924. - -- 
  925. Peter Wayner   Department of Computer Science Cornell Univ. Ithaca, NY 14850
  926. EMail:wayner@cs.cornell.edu    Office: 607-255-9202 or 255-1008
  927. Home: 116 Oak Ave, Ithaca, NY 14850  Phone: 607-277-6678
  928.  
  929.  
  930. +++++++++++++++++++++++++++
  931.  
  932. From: d88-jwa@dront.nada.kth.se (Jon W{tte)
  933. Date: 4 Jul 92 00:30:25 GMT
  934. Organization: Royal Institute of Technology, Stockholm, Sweden
  935.  
  936. .cornell.edu> wayner@cs.cornell.edu (Peter Wayner) writes:
  937.  
  938.    I need to be able to drag some text around the screen,
  939.    but whenever I try to set SetPen(patXor), it doesn't 
  940.  
  941. You probably mean PenMode...
  942.  
  943.    seem to work. Is the DrawChar routine resetting the
  944.    pen? Or am I missing something really trivial or stupid? 
  945.  
  946. Yes. Text is drawn with the more called TextMode. You
  947. should use srcOr for fast text drawing, or srcXor for
  948. your dragging needs (doing it offscreen would look better,
  949. of course)
  950.  
  951. NOTE: "srcXxx" NOT "patXxx" for TextMode, or you will break
  952. on the SE, Plus and Classic (and possibly future macs)
  953.  
  954. - -- 
  955.          Jon W{tte, Svartmangatan 18, S-111 29 Stockholm, Sweden
  956.  
  957.  "Difficult, obscure, incoherent and nonstandard does not imply more power."
  958.                - Andrew Kass in comp.sys.mac.hardware
  959.  
  960. ---------------------------
  961.  
  962. From: darweesh@acsu.buffalo.edu (michael j darweesh)
  963. Subject: Apple's Resource compression
  964. Date: 30 Jun 92 15:57:47 GMT
  965. Organization: UB
  966.  
  967. Does anyone know anything about Apple's Resource compression
  968. scheme?
  969.  
  970. More specifically, I have written a programmers' tool to compress
  971. resources and have a nice programmers' interface to decompress at
  972. run-time. Of course, it would be nice if I could offer, as a feature,
  973. the ability to compress resources into Apple's scheme for even more
  974. transparent decompression (even if my compression generally has a 
  975. better ratio and decompresses at about the same speed-VERY quickly).
  976.  
  977. I'm guessing that the format is a big secret and/or 
  978. proprietary/patented/otherwise not available, but perhaps I'm wrong...
  979.  
  980. I've been wrong before.
  981.  
  982. - -Mike Darweesh
  983.  
  984. +++++++++++++++++++++++++++
  985.  
  986. From: d88-jwa@dront.nada.kth.se (Jon W{tte)
  987. Organization: Royal Institute of Technology, Stockholm, Sweden
  988. Date: Tue, 30 Jun 1992 20:04:49 GMT
  989.  
  990. .edu> darweesh@acsu.buffalo.edu (michael j darweesh) writes:
  991.  
  992.    I'm guessing that the format is a big secret and/or 
  993.    proprietary/patented/otherwise not available, but perhaps I'm wrong...
  994.  
  995. Yes, that's true. Someone reverse-engineered it, though, and
  996. sells apps to compress other apps.
  997.  
  998. HOWEVER: the format is subject to change without further notice,
  999. and will PROBABLY DO SO !
  1000.  
  1001. - -- 
  1002.          Jon W{tte, Svartmangatan 18, S-111 29 Stockholm, Sweden
  1003.  
  1004.  "Difficult, obscure, incoherent and nonstandard does not imply more power."
  1005.                - Andrew Kass in comp.sys.mac.hardware
  1006.  
  1007. +++++++++++++++++++++++++++
  1008.  
  1009. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  1010. Organization: Kalamazoo College
  1011. Date: Wed, 1 Jul 1992 00:15:58 GMT
  1012.  
  1013. darweesh@acsu.buffalo.edu (michael j darweesh) writes:
  1014. >
  1015. >Does anyone know anything about Apple's Resource compression
  1016. >scheme?
  1017.  
  1018. Yeah.  The guys that wrote it do.  Last I heard, they were planning on
  1019. providing an interface at some future date, when everything was all
  1020. solidified and everything.  Of course, that was A YEAR AND A HALF AGO!
  1021.  
  1022. Everyone's given up hope, I think, and Apple's probably thinking it'll
  1023. be a pleasant surprise when they publish the interface sometime in 1996.
  1024. - -- 
  1025.  Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
  1026.  "Whenever I open the manuals for OOP, I have the strangest desire to find
  1027.   the nearest pillow and fall asleep."   - David Denboer
  1028.  
  1029. +++++++++++++++++++++++++++
  1030.  
  1031. From: mlanett@Apple.COM (Mark Lanett)
  1032. Date: 1 Jul 92 04:52:54 GMT
  1033. Organization: Apple Computer Inc., Cupertino, CA
  1034.  
  1035. d88-jwa@dront.nada.kth.se (Jon W{tte) writes:
  1036.  
  1037. >HOWEVER: the format is subject to change without further notice,
  1038. >and will PROBABLY DO SO !
  1039.  
  1040. Hmmm... the format changing doesn't break thing automagically, since the
  1041. system would have to provide that fabled Backwards Compatibility we programmers
  1042. all hate. What's possible is that a newer version wouldn't do a very good
  1043. job of backwards compatibility, and minor mistakes in the reverse engineering
  1044. which don't show up now could do so. Well, that's what they said about PICT,
  1045. anyway...
  1046.  
  1047. #include <personal_opinion.h>
  1048. - -- 
  1049. Have a bajillion brilliant Jobsian lithium licks.
  1050. Mark Lanett
  1051.  
  1052. +++++++++++++++++++++++++++
  1053.  
  1054. From: darweesh@acsu.buffalo.edu (michael j darweesh)
  1055. Date: 1 Jul 92 06:38:34 GMT
  1056. Organization: UB
  1057.  
  1058.  
  1059. ok, I've read the responses. It appears that the best thing to do would be
  1060. to release my version as I was planning and offer an upgrade if the time
  1061. and proper information ever make it my way.
  1062.  
  1063. Right now, I have a nifty application which compresses resources in my
  1064. format. It does especially well on color PICTs and larger textual resources.
  1065. It compresses slowly, but you only need to do this once in a while.
  1066.  
  1067. The decompression is tremendously quicker and easy to implement. Basically,
  1068. you just call a resource as you would a function with a resource handle
  1069. as an argument. I've written a small set of instructions and everything.
  1070. It's really even easier than it sounds. No icky source code to mess with.
  1071. No $199 per copy fees like some other similar products either.
  1072.  
  1073. Oh, and BTW, my compression has been better than Apple's in almost every 
  1074. instance tested.
  1075.  
  1076. So, if I released this as shareware, would anyone use it? Bug fixes and
  1077. feature requests would probably be handled quite promptly in most cases.
  1078.  
  1079. Let me know what you think...
  1080. Personal E-mail or post here...
  1081.  
  1082. - -Mike Darweesh
  1083. darweesh@acsu.buffalo.edu
  1084.  
  1085. +++++++++++++++++++++++++++
  1086.  
  1087. From: peirce@outpost.SF-Bay.org (Michael Peirce)
  1088. Date: 1 Jul 92 15:41:21 GMT
  1089. Organization: Peirce Software
  1090.  
  1091.  
  1092. In article <69487@apple.Apple.COM> (comp.sys.mac.programmer), mlanett@Apple.COM (Mark Lanett) writes:
  1093. > d88-jwa@dront.nada.kth.se (Jon W{tte) writes:
  1094. > >HOWEVER: the format is subject to change without further notice,
  1095. > >and will PROBABLY DO SO !
  1096. > Hmmm... the format changing doesn't break thing automagically, since the
  1097. > system would have to provide that fabled Backwards Compatibility we programmers
  1098. > all hate. What's possible is that a newer version wouldn't do a very good
  1099. > job of backwards compatibility, and minor mistakes in the reverse engineering
  1100. > which don't show up now could do so. Well, that's what they said about PICT,
  1101. > anyway...
  1102.  
  1103. Why do they have to be backwards compatable?  
  1104.  
  1105. If I recall recorrectly, they only use compressed resources in
  1106. the system software.  This means that when they change the
  1107. compression scheme, they need to update the resources to use
  1108. the new scheme, not the old.  Not a very hard thing to do if
  1109. you are updating the system software.  Why bother to be
  1110. backwards compatable with a format you no longer use?
  1111.  
  1112. - --  Michael Peirce      --   peirce@outpost.SF-Bay.org
  1113. - --  Peirce Software     --   Suite 301, 719 Hibiscus Place
  1114. - --                      --   San Jose, California USA 95117
  1115. - --  Makers of...        --   voice: (408) 244-6554 fax: (408) 244-6882
  1116. - --            SMOOTHIE  --   AppleLink: peirce & America Online: AFC Peirce
  1117.  
  1118. +++++++++++++++++++++++++++
  1119.  
  1120. From: lkingsley@crd.ge.com (Lorne J. Kingsley)
  1121. Date: 1 Jul 92 20:23:12 GMT
  1122. Organization: General Electric R&D
  1123.  
  1124. In article <Bqo1oC.EMM@acsu.buffalo.edu>, darweesh@acsu.buffalo.edu
  1125. (michael j darweesh) wrote:
  1126. > Does anyone know anything about Apple's Resource compression
  1127. > scheme?
  1128. > More specifically, I have written a programmers' tool to compress
  1129. > resources and have a nice programmers' interface to decompress at
  1130. > run-time. Of course, it would be nice if I could offer, as a feature,
  1131. > the ability to compress resources into Apple's scheme for even more
  1132. > transparent decompression (even if my compression generally has a 
  1133. > better ratio and decompresses at about the same speed-VERY quickly).
  1134. > I'm guessing that the format is a big secret and/or 
  1135. > proprietary/patented/otherwise not available, but perhaps I'm wrong...
  1136. > I've been wrong before.
  1137. > -Mike Darweesh
  1138.  
  1139. Maybe I'm missing something here, but isn't this *exactly* what Alysis'
  1140. More Disk Space does? I seem to recall they offered to license the
  1141. compression schemes do developers for a small fee.
  1142.  
  1143. They also mentioned they used the same scheme that Apple used in System 7.
  1144.  
  1145. You might want to contact them before going whole hog on this - it might
  1146. have already been done.
  1147.  
  1148. - - Lorne
  1149.  
  1150. **************************************************
  1151. Lorne J. Kingsley         General Electric Company
  1152. standard disclaimer: my ramblings in no way 
  1153. represent those of the General Electric Company
  1154. Internet: lkingsley@crd.ge.com
  1155. CI$: 75166,2550
  1156. America Online: LorneK1
  1157. **************************************************
  1158.  
  1159. +++++++++++++++++++++++++++
  1160.  
  1161. From: mxmora@unix.SRI.COM (Matt Mora)
  1162. Date: 1 Jul 92 16:25:34 GMT
  1163. Organization: SRI International, Menlo Park, California
  1164.  
  1165. In article <D88-JWA.92Jun30210449@dront.nada.kth.se> d88-jwa@dront.nada.kth.se (Jon W{tte) writes:
  1166. >.edu> darweesh@acsu.buffalo.edu (michael j darweesh) writes:
  1167.  
  1168. >   I'm guessing that the format is a big secret and/or 
  1169. >   proprietary/patented/otherwise not available, but perhaps I'm wrong...
  1170.  
  1171. >Yes, that's true. Someone reverse-engineered it, though, and
  1172. >sells apps to compress other apps.
  1173.  
  1174. >HOWEVER: the format is subject to change without further notice,
  1175. >and will PROBABLY DO SO !
  1176.  
  1177.  
  1178.  
  1179. No matter what Apple does to change the compression scheme its still
  1180. going to have to be backward compatible right? If I'm running system 7.X
  1181. or 8.0 and I open an old system file, Its still going to have to know how
  1182. to uncompress the compressed resources. They might add new and better 
  1183. de/compressors but I think that the current format is pretty much carved in 
  1184. stone at this point.
  1185.  
  1186.  
  1187. Matt
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195. - -- 
  1196. ___________________________________________________________
  1197. Matthew Mora                |   my Mac  Matt_Mora@sri.com
  1198. SRI International           |  my unix  mxmora@unix.sri.com
  1199. ___________________________________________________________
  1200.  
  1201. +++++++++++++++++++++++++++
  1202.  
  1203. From: d88-jwa@dront.nada.kth.se (Jon W{tte)
  1204. Date: 2 Jul 92 10:35:31 GMT
  1205. Organization: Royal Institute of Technology, Stockholm, Sweden
  1206.  
  1207. .ge.com.> lkingsley@crd.ge.com (Lorne J. Kingsley) writes:
  1208.  
  1209.    Maybe I'm missing something here, but isn't this *exactly* what Alysis'
  1210.    More Disk Space does? I seem to recall they offered to license the
  1211.    compression schemes do developers for a small fee.
  1212.  
  1213. However, I'm leary of MDS, since my disk fixing programs,
  1214. startup disks etc do not have MDS installed. And it does
  1215. not seem as solid as AutoDoubler, and I was not pleased
  1216. with AutoDoubler instead.
  1217.  
  1218. I'm getting a larger drive - maybe I'm just too cautios.
  1219.  
  1220. - -- 
  1221.          Jon W{tte, Svartmangatan 18, S-111 29 Stockholm, Sweden
  1222.  
  1223.  "Difficult, obscure, incoherent and nonstandard does not imply more power."
  1224.                - Andrew Kass in comp.sys.mac.hardware
  1225.  
  1226. +++++++++++++++++++++++++++
  1227.  
  1228. From: d88-jwa@dront.nada.kth.se (Jon W{tte)
  1229. Date: 2 Jul 92 10:39:04 GMT
  1230. Organization: Royal Institute of Technology, Stockholm, Sweden
  1231.  
  1232. > mxmora@unix.SRI.COM (Matt Mora) writes:
  1233.  
  1234.    >HOWEVER: the format is subject to change without further notice,
  1235.    >and will PROBABLY DO SO !
  1236.  
  1237.    No matter what Apple does to change the compression scheme its still
  1238.    going to have to be backward compatible right? If I'm running system 7.X
  1239.    or 8.0 and I open an old system file, Its still going to have to know how
  1240.    to uncompress the compressed resources. They might add new and better 
  1241.    de/compressors but I think that the current format is pretty much carved in 
  1242.    stone at this point.
  1243.  
  1244.  
  1245. Not at all. Compression is only found in system files. SO, special
  1246. case for opening an old system file, and use that compression then,
  1247. else use the new compression.
  1248.  
  1249. There is no way that a non-apple file can "legally" have compressed
  1250. resources.
  1251.  
  1252. - -- 
  1253.          Jon W{tte, Svartmangatan 18, S-111 29 Stockholm, Sweden
  1254.  
  1255.  "Difficult, obscure, incoherent and nonstandard does not imply more power."
  1256.                - Andrew Kass in comp.sys.mac.hardware
  1257.  
  1258. ---------------------------
  1259.  
  1260. End of C.S.M.P. Digest
  1261. **********************
  1262.